Change in openvpn[master]: multi: Fix wrong sigma value in multi_push_restart_schedule_exit
A message that is not in the archive (sent off-list or not yet received): gerrit.1761570487000.I62b8263f18c4e2e7f5ecacb4616737f5ba836303@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email
to review the following change.
Change subject: multi: Fix wrong sigma value in multi_push_restart_schedule_exit
......................................................................
multi: Fix wrong sigma value in multi_push_restart_schedule_exit
Sigma was computed based on the absolute time and
not the delta.
---
M src/openvpn/multi.c
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/11/1311/1
src/openvpn/multi.c +2 -4
@@ -3843,7 +3843,6 @@ {struct hash_iterator hi;struct hash_element *he; -struct timeval tv;/* tell all clients to restart */ hash_iterator_init (m->iter, &hi);
@@ -3861,15 +3860,14 @@/* reschedule signal */ ASSERT (!openvpn_gettimeofday (&m->deferred_shutdown_signal.wakeup,NULL )); - tv.tv_sec =2 ; - tv.tv_usec =0 ; +struct timeval tv = { .tv_sec =2 , .tv_usec =0 };tv_add (&m->deferred_shutdown_signal.wakeup, &tv); m->deferred_shutdown_signal.signal_received = m->top.sig->signal_received;schedule_add_entry (m->schedule, (struct schedule_entry *)&m->deferred_shutdown_signal, &m->deferred_shutdown_signal.wakeup, -compute_wakeup_sigma (&m->deferred_shutdown_signal.wakeup)); +compute_wakeup_sigma (&tv));signal_reset (m->top.sig,0 ); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303
Gerrit-Change-Number: 1311
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: plaisthos.
flichtenheld has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email )
Change subject: multi: Fix wrong sigma value in multi_push_restart_schedule_exit
......................................................................
Patch Set 8:
This change is ready for review.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303
Gerrit-Change-Number: 1311
Gerrit-PatchSet: 8
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Fri, 12 Dec 2025 13:44:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email )
Change subject: multi: Fix wrong sigma value in multi_push_restart_schedule_exit
......................................................................
Patch Set 9: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303
Gerrit-Change-Number: 1311
Gerrit-PatchSet: 9
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 15 Dec 2025 15:04:46 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH v9 1/1 multi: Fix wrong sigma value in multi_push_restart_schedule_exit
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
Sigma was computed based on the absolute time and
not the delta.
Note that this probably makes no actual difference in practice. The sigma value is irrelevant on first call and multi_push_restart_schedule_exit should not be called multiple times since it is only called if deferred_shutdown_signal.signal_received is not set, yet.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1311
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1311
This mail reflects revision 9 of this Change.
Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>
src/openvpn/multi.c +2 -4
@@ -3820,7 +3820,6 @@ {struct hash_iterator hi;struct hash_element *he; -struct timeval tv;/* tell all clients to restart */ hash_iterator_init (m->iter, &hi);
@@ -3838,15 +3837,14 @@/* reschedule signal */ ASSERT (!openvpn_gettimeofday (&m->deferred_shutdown_signal.wakeup,NULL )); - tv.tv_sec =2 ; - tv.tv_usec =0 ; +struct timeval tv = { .tv_sec =2 , .tv_usec =0 };tv_add (&m->deferred_shutdown_signal.wakeup, &tv); m->deferred_shutdown_signal.signal_received = m->top.sig->signal_received;schedule_add_entry (m->schedule, (struct schedule_entry *)&m->deferred_shutdown_signal, &m->deferred_shutdown_signal.wakeup, -compute_wakeup_sigma (&m->deferred_shutdown_signal.wakeup)); +compute_wakeup_sigma (&tv));signal_reset (m->top.sig,0 ); }
[Openvpn-devel] [PATCH applied] Re: multi: Fix wrong sigma value in multi_push_restart_schedule_exit
Indeed, the original code looks wrong here, according to the new documentation just added :-) - interesting functions we have there.
Stared-at-code, not tested beyond "BB says it's all green".
Your patch has been applied to the master branch.
commit 310c6b9e789a102b71ad9d4ba56bc11d1c8a0a73
Author: Frank Lichtenheld Date: Mon Dec 15 16:04:54 2025 +0100
multi: Fix wrong sigma value in multi_push_restart_schedule_exit
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1311
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35075.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#10) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: multi: Fix wrong sigma value in multi_push_restart_schedule_exit
......................................................................
multi: Fix wrong sigma value in multi_push_restart_schedule_exit
Sigma was computed based on the absolute time and
not the delta.
Note that this probably makes no actual difference in practice. The sigma value is irrelevant on first call and multi_push_restart_schedule_exit should not be called multiple times since it is only called if deferred_shutdown_signal.signal_received is not set, yet.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1311
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35075.html
---
M src/openvpn/multi.c
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/11/1311/10
src/openvpn/multi.c +2 -4
@@ -3820,7 +3820,6 @@ {struct hash_iterator hi;struct hash_element *he; -struct timeval tv;/* tell all clients to restart */ hash_iterator_init (m->iter, &hi);
@@ -3838,15 +3837,14 @@/* reschedule signal */ ASSERT (!openvpn_gettimeofday (&m->deferred_shutdown_signal.wakeup,NULL )); - tv.tv_sec =2 ; - tv.tv_usec =0 ; +struct timeval tv = { .tv_sec =2 , .tv_usec =0 };tv_add (&m->deferred_shutdown_signal.wakeup, &tv); m->deferred_shutdown_signal.signal_received = m->top.sig->signal_received;schedule_add_entry (m->schedule, (struct schedule_entry *)&m->deferred_shutdown_signal, &m->deferred_shutdown_signal.wakeup, -compute_wakeup_sigma (&m->deferred_shutdown_signal.wakeup)); +compute_wakeup_sigma (&tv));signal_reset (m->top.sig,0 ); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303
Gerrit-Change-Number: 1311
Gerrit-PatchSet: 10
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email )
Change subject: multi: Fix wrong sigma value in multi_push_restart_schedule_exit
......................................................................
multi: Fix wrong sigma value in multi_push_restart_schedule_exit
Sigma was computed based on the absolute time and
not the delta.
Note that this probably makes no actual difference in practice. The sigma value is irrelevant on first call and multi_push_restart_schedule_exit should not be called multiple times since it is only called if deferred_shutdown_signal.signal_received is not set, yet.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1311
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35075.html
---
M src/openvpn/multi.c
1 file changed, 2 insertions(+), 4 deletions(-)
src/openvpn/multi.c +2 -4
@@ -3820,7 +3820,6 @@ {struct hash_iterator hi;struct hash_element *he; -struct timeval tv;/* tell all clients to restart */ hash_iterator_init (m->iter, &hi);
@@ -3838,15 +3837,14 @@/* reschedule signal */ ASSERT (!openvpn_gettimeofday (&m->deferred_shutdown_signal.wakeup,NULL )); - tv.tv_sec =2 ; - tv.tv_usec =0 ; +struct timeval tv = { .tv_sec =2 , .tv_usec =0 };tv_add (&m->deferred_shutdown_signal.wakeup, &tv); m->deferred_shutdown_signal.signal_received = m->top.sig->signal_received;schedule_add_entry (m->schedule, (struct schedule_entry *)&m->deferred_shutdown_signal, &m->deferred_shutdown_signal.wakeup, -compute_wakeup_sigma (&m->deferred_shutdown_signal.wakeup)); +compute_wakeup_sigma (&tv));signal_reset (m->top.sig,0 ); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1311?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I62b8263f18c4e2e7f5ecacb4616737f5ba836303
Gerrit-Change-Number: 1311
Gerrit-PatchSet: 10
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>